package designPatterns.P02_工厂模式_Factory.P02_工厂方法.P01_PizzaStore.第1版.order;

import designPatterns.P02_工厂模式_Factory.P02_工厂方法.P01_PizzaStore.第1版.pizza.BJCheesePizza;
import designPatterns.P02_工厂模式_Factory.P02_工厂方法.P01_PizzaStore.第1版.pizza.BJPepperPizza;
import designPatterns.P02_工厂模式_Factory.P02_工厂方法.P01_PizzaStore.第1版.pizza.Pizza;

public class BJOrderPizza extends OrderPizza{
    @Override
    Pizza createPizza(String type) {
        Pizza pizza = null;
        switch (type) {
            case "cheese":
                pizza = new BJCheesePizza();
                break;
            case "pepper":
                pizza = new BJPepperPizza();
            default:
                break;
        }

        return pizza;
    }
}
